import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/404',
            component: () => import('../components/page/404.vue'),
            meta: {title: '404'}
        },
        {
            path: '/403',
            component: () => import('../components/page/403.vue'),
            meta: {title: '403'}
        },
        {
            path: '/Login',
            component: () => import('../components/page/Login'),
            meta: {title: '登录'}
        },
        {
            path: '/signUp',
            component: () => import('../components/page/signUp'),
            meta: {title: '注册'}
        },
        {
            path: '/index',
            component: () => import('../components/page/index'),
            meta: {title: '主页'}
        },
        {
            path: '/forgetPassword',
            component: () => import('../components/page/forgetPassword'),
            meta: {title: '忘记密码'}
        },
        {
            path: '/updateUser',
            component: () => import('../components/page/updateUser'),
            meta: {title: '更新用户信息'}
        },
        {
            path: '/specificPet',
            component: () => import('../components/page/specificPet'),
            meta: {title: '具体宠物页面'}
        },
        {
            path: '/userShowApprove',
            component: () => import('../components/page/userShowApprove'),
            meta: {title: '用户查看发布'}
        },
        {
            path: '/userReleaseAdoption',
            component: () => import('../components/page/userReleaseAdoption'),
            meta: {title: '用户发布领养'}
        },
        {
            path: '/userShowAdoption',
            component: () => import('../components/page/userShowAdoption'),
            meta: {title: '用户查看申请领养情况'}
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
